<template>
  <div class="DetailPicture-container">
    <div class="content">
      <div class="switch">
        <span class="iconfont icon-xiangzuo"></span>
      </div>
      <div class="picture">
        <img :src="popupStore?.url" alt="" />
      </div>
      <div class="switch">
        <span class="iconfont icon-xiangyou"></span>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { usePopupStore } from '@/stores/modules/Popup'
const popupStore = usePopupStore()
</script>

<style scoped lang="scss">
.DetailPicture-container {
  position: fixed;
  width: 100%;
  height: 100vh;
  padding: 0 2vw;
  backdrop-filter: blur(20px);
  background-color: rgba($gray-10, 0.8);
  left: 0;
  top: 0;

  .content {
    padding-top: calc($topBar-height + 10px);
    padding-right: $right-popup-width;
    display: flex;
    height: 100%;
    justify-content: space-between;
    align-items: center;

    .picture {
      display: flex;
      height: 100%;
      overflow-y: auto;
      padding: 0 3vw;

      &::-webkit-scrollbar {
        width: 0px;
        height: 0px;
      }

      img {
        margin: auto;
        max-width: 100%;
      }
    }

    .switch {
      opacity: 0;
      color: $gray-10;
      min-width: 48px;
      min-height: 48px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      background-color: rgba($gray-2, 0.5);
      transition: all 0.2s;

      &:hover {
        background-color: rgba($gray-2, 1);
      }

      span {
        font-size: 20px;
      }
    }
  }
}
</style>
